﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CSM_SQL.DAL;

namespace CSM_SQL.BLL
{
    public class GoodsBLL
    {
        private GoodsDAL _goodsDal;
        public GoodsDAL GoodsDal
        {
            get
            {
                if (_goodsDal == null)
                    _goodsDal = new GoodsDAL();
                return _goodsDal;
            }
        }

        public List<Goods> All()
        {
            return GoodsDal.All();
        }

        public Boolean Add(Goods item)
        {
            return GoodsDal.Add(item);
        }

        public Boolean Edit(Goods item)
        {
            return GoodsDal.Edit(item);
        }

        public Boolean Delete(int ID)
        {
            return GoodsDal.Delete(ID);

        }

        public List<ShowGoods> ShowGoods()
        {
            return GoodsDal.ShowGoods();
        }

        public Boolean InStore(int G_ID,int num)
        {
            return GoodsDal.InStore(G_ID, num);
        }
    }
}
